function report(outfile, multi)
% Funcion:   report
% Proposito:
%
%
global Q_LIMIT;
global BUSY;
global IDLE;

global next_event_type;
global num_custs_delayed;
global num_delays_required;
global num_events;
global num_in_q;
global server_status;

global area_num_in_q;
global area_server_status;
global area_system_amount;
global mean_interarrival;
global mean_service;
global time;
global time_arrival;
global time_last_event;
global time_next_event;
global total_of_delays;
global total_in_system;
global delayinqueue;
global cqueue;
global morethanoneminute;

fprintf(outfile, "\n\nTiempo medio en cola:   %16.3f minutos\n\n", total_of_delays / num_custs_delayed);

fprintf(outfile, "Tiempo medio de un cliente en el sistema:   %16.3f minutos\n\n",  mean(total_in_system));

fprintf(outfile, "Numero maximo de clientes en cola: %d\n\n", max(cqueue));

fprintf(outfile, "Maximo retardo en la cola: %16.3f minutos\n\n", max(delayinqueue));

fprintf(outfile, "Maximo retardo en el sistema: %16.3f minutos\n\n", max(total_in_system));

fprintf(outfile, "Proporcion de clientes con retardo mayor a un minuto: %16.3f\n\n", morethanoneminute/num_delays_required);

fprintf(outfile, "Cantidad media de clientes en el sistema:  %16.3f\n\n", ...
                area_system_amount / time);

fprintf(outfile, "Longitud media de la cola:  %16.3f\n\n", ...
		area_num_in_q / time);

fprintf(outfile, "Utilizacion del servidor:   %16.3f\n\n", ...
		area_server_status / time);

fprintf(outfile, "Simulacion finalizada a:    %16.3f minutos\n", time);

fprintf(multi, ",%.3f,%.3f,%.3f,%.3f,%d,%.3f,%.3f,%.3f,%.3f,%.3f,%.3f,%.3f,%.3f", area_num_in_q, area_system_amount, area_server_status, total_of_delays / num_custs_delayed, max(cqueue), max(delayinqueue), max(total_in_system), morethanoneminute/num_delays_required, area_system_amount / time, area_num_in_q / time, area_server_status / time, time,  mean(total_in_system));

return;
